Namespace - LJCDBClientLib
Parameters
dataObject - The record object.
keyColumns - The record containing the key field values.
propertyNames - The incuded column property names.
filters - The filter values.
Syntax
C# |
public Void Update(Object dataObject, DbColumns keyColumns, List<String> propertyNames = null, DbFilters filters = null)
|
Updates the record.
(DE)
Remarks
Parameters
keyColumns
This parameter defines the values to be used in the SQL where clause. It
is only used if the 'filters' parameter is null.
The values are separated with the 'AND' operator.
propertyNames
This parameter defines the primary table columns that are to be updated.
If it is null, then all the primary table columns are updated.
It must not include Calculated or Join columns or it will cause an error.
filters
This parameter defines the values to be used in the SQL where clause. If
it is defined, then the keyColumns parameter is not used.
The 'filters' object can define a complex where clause including
combinations of 'AND' and 'OR' operators.
Creates an "Update"
DbRequest
object, which is available in the Request property. The request object is
passed to the
ExecuteRequest()
method.
Method Graph
All methods are in LJCDBMessage.DbCommon.
RequestDataColumns(dataObject)
RequestDataColumns(baseDefinition)
RequestColumns(dataObject)
CreateValueColumn(dbColumn)
RequestDataKeys(keyColumns)
RequestKeys(keyColumns)
CreateKeyColumn(keyColumn)
Example
C# |
using LJCNetCommon;
using LJCDBMessage;
public class PersonManager
{
dataObject
keyObject
propertyNames
filters
public void Update(Person dataObject, Person keyObject, List<string> propertyNames = null
, DbFilters filters = null)
{
mDataManager.Update(dataObject, keyObject, propertyNames, filters);
AffectedCount = mDataManager.AffectedCount;
SQLStatement = mDataManager.SQLStatement;
}
}
|
Copyright © Lester J. Clark and Contributors.
Licensed under the MIT License.